package kz.pompei.OneGwt.ifaces.util;

public class Dummy {
  public static <T> Getter<T> returnsNull() {
    return new Getter<T>() {
      @Override
      public T get() {
        return null;
      }
    };
  }
  
  public static <T> Setter<T> doNothing() {
    return new Setter<T>() {
      @Override
      public void set(T t) {}
    };
  }
  
  public static <T> Acceptor<T> doNothing_returnsNull() {
    return new Acceptor<T>() {
      @Override
      public T get() {
        return null;
      }
      
      @Override
      public void set(T t) {}
    };
  }
  
  public static StrGetter returnsEmptyStr() {
    return new StrGetter() {
      @Override
      public String get() {
        return "";
      }
    };
  }
  
  public static StrSetter doNothing_s() {
    return new StrSetter() {
      @Override
      public void set(String t) {}
    };
  }
  
  public static StrAcceptor doNothing_returnsNull_s() {
    return new StrAcceptor() {
      @Override
      public void set(String t) {}
      
      @Override
      public String get() {
        return null;
      }
    };
  }
  
  public static StrAcceptor doNothing_returnsEmpty() {
    return new StrAcceptor() {
      @Override
      public void set(String t) {}
      
      @Override
      public String get() {
        return "";
      }
    };
  }
  
  public static BoolGetter returnsFalse() {
    return new BoolGetter() {
      @Override
      public boolean isit() {
        return false;
      }
    };
  }
  
  public static BoolGetter returnsTrue() {
    return new BoolGetter() {
      @Override
      public boolean isit() {
        return true;
      }
    };
  }
  
  public static BoolSetter doNothing_b() {
    return new BoolSetter() {
      @Override
      public void set(boolean value) {}
    };
  }
  
  public static BoolAcceptor doNothing_returnsFalse() {
    return new BoolAcceptor() {
      @Override
      public void set(boolean value) {}
      
      @Override
      public boolean isit() {
        return false;
      }
    };
  }
  
  public static BoolAcceptor doNothing_returnsTrue() {
    return new BoolAcceptor() {
      @Override
      public void set(boolean value) {}
      
      @Override
      public boolean isit() {
        return true;
      }
    };
  }
  
  public static HandlerKiller noKiller() {
    return new HandlerKiller() {
      @Override
      public void killHandler() {}
    };
  }
  
  public static Handler noHandler() {
    return new Handler() {
      @Override
      public void handle() {}
    };
  }
}
